package com.yk.govpro.model;

import javax.persistence.*;

/**
 * Created by zsyoung on 2017/5/24.
 */
@Entity
@Table(name = "noticedetail", schema = "govpro", catalog = "")
public class NoticedetailEntity {
    private String noticeId;
    private String attachments;
    private String creatorOrgName;
    private String html;
    private String projectPurchaseWayName;

    @Id
    @Column(name = "notice_id", nullable = false, length = 255)
    public String getNoticeId() {
        return noticeId;
    }

    public void setNoticeId(String noticeId) {
        this.noticeId = noticeId;
    }

    @Basic
    @Column(name = "attachments", nullable = true, length = 255)
    public String getAttachments() {
        return attachments;
    }

    public void setAttachments(String attachments) {
        this.attachments = attachments;
    }

    @Basic
    @Column(name = "creatorOrgName", nullable = true, length = 255)
    public String getCreatorOrgName() {
        return creatorOrgName;
    }

    public void setCreatorOrgName(String creatorOrgName) {
        this.creatorOrgName = creatorOrgName;
    }

    @Basic
    @Column(name = "html", nullable = true, length = 16777216)
    public String getHtml() {
        return html;
    }

    public void setHtml(String html) {
        this.html = html;
    }

    @Basic
    @Column(name = "projectPurchaseWayName", nullable = true, length = 255)
    public String getProjectPurchaseWayName() {
        return projectPurchaseWayName;
    }

    public void setProjectPurchaseWayName(String projectPurchaseWayName) {
        this.projectPurchaseWayName = projectPurchaseWayName;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        NoticedetailEntity that = (NoticedetailEntity) o;

        if (noticeId != null ? !noticeId.equals(that.noticeId) : that.noticeId != null) return false;
        if (attachments != null ? !attachments.equals(that.attachments) : that.attachments != null) return false;
        if (creatorOrgName != null ? !creatorOrgName.equals(that.creatorOrgName) : that.creatorOrgName != null)
            return false;
        if (html != null ? !html.equals(that.html) : that.html != null) return false;
        if (projectPurchaseWayName != null ? !projectPurchaseWayName.equals(that.projectPurchaseWayName) : that.projectPurchaseWayName != null)
            return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = noticeId != null ? noticeId.hashCode() : 0;
        result = 31 * result + (attachments != null ? attachments.hashCode() : 0);
        result = 31 * result + (creatorOrgName != null ? creatorOrgName.hashCode() : 0);
        result = 31 * result + (html != null ? html.hashCode() : 0);
        result = 31 * result + (projectPurchaseWayName != null ? projectPurchaseWayName.hashCode() : 0);
        return result;
    }
}
